<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: DST functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__rtc__dst__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">DST functions<div class="ingroups"><a class="el" href="group__group__rtc.html">RTC          (Real-Time Clock)</a> &raquo; <a class="el" href="group__group__rtc__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gafaa2c3a4ba08f8fa5050b42527680995"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__rtc__enums.html#ga45a1b113f07f81bc369d7bf9da75eaae">cy_en_rtc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__rtc__dst__functions.html#gafaa2c3a4ba08f8fa5050b42527680995">Cy_RTC_EnableDstTime</a> (<a class="el" href="structcy__stc__rtc__dst__t.html">cy_stc_rtc_dst_t</a> const *dstTime, <a class="el" href="structcy__stc__rtc__config__t.html">cy_stc_rtc_config_t</a> const *timeDate)</td></tr>
<tr class="memdesc:gafaa2c3a4ba08f8fa5050b42527680995"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function sets the DST time, configures the DST start time when the specified time is outside DST period and configures the ALARM2 interrupt register with the appropriate DST time.  <a href="#gafaa2c3a4ba08f8fa5050b42527680995">More...</a><br /></td></tr>
<tr class="separator:gafaa2c3a4ba08f8fa5050b42527680995"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37374ecb34a430c3735ef9ba585681b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__rtc__enums.html#ga45a1b113f07f81bc369d7bf9da75eaae">cy_en_rtc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__rtc__dst__functions.html#ga37374ecb34a430c3735ef9ba585681b1">Cy_RTC_SetNextDstTime</a> (<a class="el" href="structcy__stc__rtc__dst__format__t.html">cy_stc_rtc_dst_format_t</a> const *nextDst)</td></tr>
<tr class="memdesc:ga37374ecb34a430c3735ef9ba585681b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">A low-level DST function sets ALARM2 for a next DST event.  <a href="#ga37374ecb34a430c3735ef9ba585681b1">More...</a><br /></td></tr>
<tr class="separator:ga37374ecb34a430c3735ef9ba585681b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2d29ebc8c658ccfefcc2389d26d6bec"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__rtc__dst__functions.html#gae2d29ebc8c658ccfefcc2389d26d6bec">Cy_RTC_GetDstStatus</a> (<a class="el" href="structcy__stc__rtc__dst__t.html">cy_stc_rtc_dst_t</a> const *dstTime, <a class="el" href="structcy__stc__rtc__config__t.html">cy_stc_rtc_config_t</a> const *timeDate)</td></tr>
<tr class="memdesc:gae2d29ebc8c658ccfefcc2389d26d6bec"><td class="mdescLeft">&#160;</td><td class="mdescRight">A low-level DST function returns the current DST status using given time information.  <a href="#gae2d29ebc8c658ccfefcc2389d26d6bec">More...</a><br /></td></tr>
<tr class="separator:gae2d29ebc8c658ccfefcc2389d26d6bec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gafaa2c3a4ba08f8fa5050b42527680995"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafaa2c3a4ba08f8fa5050b42527680995">&#9670;&nbsp;</a></span>Cy_RTC_EnableDstTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__rtc__enums.html#ga45a1b113f07f81bc369d7bf9da75eaae">cy_en_rtc_status_t</a> Cy_RTC_EnableDstTime </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcy__stc__rtc__dst__t.html">cy_stc_rtc_dst_t</a> const *&#160;</td>
          <td class="paramname"><em>dstTime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__rtc__config__t.html">cy_stc_rtc_config_t</a> const *&#160;</td>
          <td class="paramname"><em>timeDate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function sets the DST time, configures the DST start time when the specified time is outside DST period and configures the ALARM2 interrupt register with the appropriate DST time. </p>
<p>This function sets the DST stop time if the specified time is already in the DST period. The DST period is a period of time between the DST start time and DST stop time. The DST start time and DST stop time is presented in the DST configuration structure, see <a class="el" href="structcy__stc__rtc__dst__t.html">cy_stc_rtc_dst_t</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dstTime</td><td>The DST configuration structure, see <a class="el" href="structcy__stc__rtc__dst__t.html">cy_stc_rtc_dst_t</a>.</td></tr>
    <tr><td class="paramname">timeDate</td><td>The time and date structure. The appropriate DST time is set based on this time and date, see <a class="el" href="structcy__stc__rtc__config__t.html">cy_stc_rtc_config_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A validation check result of RTC register update. See <a class="el" href="group__group__rtc__enums.html#ga45a1b113f07f81bc369d7bf9da75eaae">cy_en_rtc_status_t</a>. </dd></dl>

</div>
</div>
<a id="ga37374ecb34a430c3735ef9ba585681b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37374ecb34a430c3735ef9ba585681b1">&#9670;&nbsp;</a></span>Cy_RTC_SetNextDstTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__rtc__enums.html#ga45a1b113f07f81bc369d7bf9da75eaae">cy_en_rtc_status_t</a> Cy_RTC_SetNextDstTime </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcy__stc__rtc__dst__format__t.html">cy_stc_rtc_dst_format_t</a> const *&#160;</td>
          <td class="paramname"><em>nextDst</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A low-level DST function sets ALARM2 for a next DST event. </p>
<p>If Cy_RTC_GetDSTStatus() is true(=1), the next DST event should be the DST stop, then this function should be called with the DST stop time. Used by the <a class="el" href="group__group__rtc__dst__functions.html#gafaa2c3a4ba08f8fa5050b42527680995">Cy_RTC_EnableDstTime</a> and <a class="el" href="group__group__rtc__interrupt__functions.html#gab9511169906c3a9f1130fdcd826a15e7">Cy_RTC_DstInterrupt</a> functions.</p>
<p>If the time format(.format) is relative option(=0), the RelativeToFixed() is called to convert to a fixed date.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nextDst</td><td>The structure with time at which a next DST event should occur (ALARM2 interrupt should occur). See <a class="el" href="structcy__stc__rtc__config__t.html">cy_stc_rtc_config_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A validation check result of RTC register update. See <a class="el" href="group__group__rtc__enums.html#ga45a1b113f07f81bc369d7bf9da75eaae">cy_en_rtc_status_t</a>. </dd></dl>

</div>
</div>
<a id="gae2d29ebc8c658ccfefcc2389d26d6bec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2d29ebc8c658ccfefcc2389d26d6bec">&#9670;&nbsp;</a></span>Cy_RTC_GetDstStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Cy_RTC_GetDstStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcy__stc__rtc__dst__t.html">cy_stc_rtc_dst_t</a> const *&#160;</td>
          <td class="paramname"><em>dstTime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__rtc__config__t.html">cy_stc_rtc_config_t</a> const *&#160;</td>
          <td class="paramname"><em>timeDate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A low-level DST function returns the current DST status using given time information. </p>
<p>This function is used in the initial state of a system. If the DST is enabled, the system sets the DST start or stop as a result of this function. Used by the <a class="el" href="group__group__rtc__dst__functions.html#gafaa2c3a4ba08f8fa5050b42527680995">Cy_RTC_EnableDstTime</a> and <a class="el" href="group__group__rtc__interrupt__functions.html#gab9511169906c3a9f1130fdcd826a15e7">Cy_RTC_DstInterrupt</a> functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dstTime</td><td>The DST configuration structure, see <a class="el" href="structcy__stc__rtc__dst__t.html">cy_stc_rtc_dst_t</a>.</td></tr>
    <tr><td class="paramname">timeDate</td><td>The time and date structure. The appropriate DST time is set based on this time and date, see <a class="el" href="structcy__stc__rtc__config__t.html">cy_stc_rtc_config_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>False - The current date and time is out of the DST period. True - The current date and time is in the DST period. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
